<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class User_model extends CI_Model
{
    public function __construct()
    {
        parent::__construct();
        /*
        *   working with database
        */
        $this->load->database(); 
    }
    
    public function check_acc_login($username, $password)
    {
        $condition = array(
            'username' => $username,
            'password' => $password,
        );
        
        $this->db->select('*');
        $this->db->from('users');
        $this->db->where($condition);
        
        $query = $this->db->get();
        
        if($query->num_rows() > 0 ) {
            return true;
        } return false;
    }
}